/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package baiwa.rta.model;

import java.io.Serializable;

/**
 *
 * @author jirapatjantsakool
 */
public class RMcdhdrPKModel extends BaseModel implements Serializable {
    private int cdhid;
    private byte[] cdhdocno;

    public RMcdhdrPKModel() {
    }

    public RMcdhdrPKModel(int cdhid, byte[] cdhdocno) {
        this.cdhid = cdhid;
        this.cdhdocno = cdhdocno;
    }

    public int getCdhid() {
        return cdhid;
    }

    public void setCdhid(int cdhid) {
        this.cdhid = cdhid;
    }

    public byte[] getCdhdocno() {
        return cdhdocno;
    }

    public void setCdhdocno(byte[] cdhdocno) {
        this.cdhdocno = cdhdocno;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) cdhid;
        hash += (cdhdocno != null ? cdhdocno.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof RMcdhdrPKModel)) {
            return false;
        }
        RMcdhdrPKModel other = (RMcdhdrPKModel) object;
        if (this.cdhid != other.cdhid) {
            return false;
        }
        if ((this.cdhdocno == null && other.cdhdocno != null) || (this.cdhdocno != null && !this.cdhdocno.equals(other.cdhdocno))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "baiwa.rta.model.RmcdhdrPK[ cdhid=" + cdhid + ", cdhdocno=" + cdhdocno + " ]";
    }
    
}
